-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support RunPlugin for Maven and Gradle plugins #1608
Conversation
c973271
to
a786e34
Compare
a786e34
to
f328017
Compare
public CompletableFuture<GetSchemaResponse> getSchema(GetSchemaRequest request) { | ||
throw new UnsupportedOperationException("Method 'getSchema' is not implemented"); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of me thinks we should prefer interfaces with default implementations to abstract classes, but I don't know if there are important reasons to/to not to, so happy either way. I think Provider
was an interface in TS and we found that a bit problematic at times, but TS interfaces don't support default implementations, so maybe that was it. Not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all internal for now in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the point of this PR, interface sounds like a great idea. I converted it for now, let's see how we want it to evolve later. It's all internal for now, indeed.
This PR implements RunPlugin for the Java provider host. It's implemented for both Maven and Gradle but not other executors. For now, I assume we don't want folks to author plugins with less popular package managers, but we can also add those later.
To test RunPlugin, I creates a very basic provider gRPC service that implements only GetSchema. My test provider returns a hard-coded schema, and then tests validate the it goes smoothly through the CLI. Later on we can enhance those tests to be real resource providers.
All SDK classes are in the
internal
module.Resolve #1606